﻿using System;
using System.Globalization;
using System.Windows.Controls;

namespace XamlTorrent.Common.Validation
{
    public class ValueRequiredRule : ValidationRule
    {
        public override ValidationResult Validate(object value, CultureInfo cultureInfo)
        {
            if (value == null || String.IsNullOrEmpty(value as string))
                return new ValidationResult(false, "Value is required");

            return new ValidationResult(true, null);
        }
    }
}
